<template>
	<view class="th-process-item-box">
		<view class="title-view-box">{{ stepData.nodeStatusName != undefined ? stepData.nodeStatusName : stepData.deptId ? '单位办理中' : '问题处理' }}</view>

		<th-cell v-if="stepData.typeName != undefined && stepData.typeName != ''" :required="false" :disabled="true" titleShow="问题类型" :loge="true" :value="stepData.typeName"></th-cell>
		<th-cell v-if="stepData.approveFlagName != undefined && stepData.approveFlagName != ''" :required="false" :disabled="true" titleShow="处理类型" :loge="true" :value="stepData.approveFlagName"></th-cell>
		<view v-if="stepData.content != undefined && stepData.content.length > 0" class="desc-cotent2x">
			<view style="color: #999;" v-if="['2', '11'].indexOf(stepData.nodeStatus) > -1">办理答复</view>
			<view style="color: #999;" v-else>处理备注</view>
			{{ stepData.content }}
		</view>
		<view v-if="stepData.replyContent != undefined && stepData.replyContent.length > 0" class="desc-cotent2x">
			<view style="color: #999;">办理答复</view>
			{{ stepData.replyContent }}
		</view>

		<block v-if="stepData.nodeStatus == '4'">
			<th-cell :required="false" showLtop :disabled="true" titleShow="主办单位" :loge="true" :value="stepData.zbHandlerName"></th-cell>
			<th-cell :required="false" showLtop :disabled="true" titleShow="协办单位" :loge="true" :value="stepData.xbHandlerName"></th-cell>
			<th-cell :required="false" showLtop :disabled="true" titleShow="答复时间" :loge="true" :value="stepData.latestReplyTime"></th-cell>
		</block>
		<block v-if="stepData.nodeStatus == '5'">
			<th-cell :required="false" showLtop :disabled="true" titleShow="主办单位" :loge="true" :value="stepData.zbHandlerName"></th-cell>
			<th-cell :required="false" showLtop :disabled="true" titleShow="协办单位" :loge="true" :value="stepData.xbHandlerName"></th-cell>
		</block>

		<th-cell :required="false" showLtop :disabled="true" titleShow="处理人" :loge="true" :value="stepData.approveUserName || stepData.deptName"></th-cell>
		<th-cell :showLbto="stepData.fileList.length > 0 ? false : true" :required="false" :disabled="true" titleShow="处理时间" :loge="true" :value="stepData.approveTime || stepData.replyTime"></th-cell>
		<view class="desc-content2" v-for="(item, index) in stepData.fileList" :key="index"><th-file :file="item" @priview="priview"></th-file></view>
	</view>
</template>

<script>
export default {
	name: 'th-process-item',
	data() {
		return {};
	},
	props: {
		title: {
			type: String,
			default: '问题处理'
		},
		stepData: {
			type: Object,
			default: {}
		}
	},
	methods: {
		//预览
		priview(item) {
			this.$showLine(item);
		}
	}
};
</script>

<style scoped lang="scss">
.th-process-item-box {
	width: 100%;
	box-sizing: border-box;
	background-color: #ffffff;

	.title-view-box {
		width: 100%;
		display: flex;
		align-items: center;
		height: 100rpx;
		font-size: 34rpx;
		padding-left: 46rpx;
		font-family: PingFangSC-Semibold, PingFang SC;
		font-weight: bold;
		color: #333333;
		line-height: 48rpx;
		border-bottom: 2rpx solid #f6f7fb;
	}
}

.desc-cotent2x {
	width: 100%;
	padding: 30rpx 46rpx;
	box-sizing: border-box;
	word-break: break-all;
	// min-height: 180rpx;
	font-size: 32rpx;
	font-family: PingFang-SC-Medium, PingFang-SC;
	font-weight: 500;
	color: #333333;
	line-height: 60rpx;
	// background: yellowgreen;
}

.desc-content2 {
	padding: 10rpx 46rpx 22rpx;
	font-size: 32rpx;
	font-family: PingFang-SC-Medium, PingFang-SC;
	font-weight: 500;
	color: #333333;
	line-height: 60rpx;
}
</style>
